﻿<catel:DataWindow x:Class="LprConfiger.Views.MainWindow"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:catel="http://catel.codeplex.com"
                  xmlns:ViewModels="clr-namespace:LprConfiger.ViewModels"
                  x:TypeArguments="ViewModels:MainWindowViewModel"
                  ShowInTaskbar="True" 
                  ResizeMode="CanResize" 
                  mc:Ignorable="d" 
                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                  xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
                  xmlns:Behaviors="clr-namespace:LprConfiger.Behaviors" WindowStartupLocation="CenterScreen">
    
    <!-- Resources -->
    <catel:DataWindow.Resources>
    </catel:DataWindow.Resources>
    
    <!-- Content -->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" MinHeight="400"  />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto" MinWidth="100" />
            <ColumnDefinition  MinWidth="600"/>
        </Grid.ColumnDefinitions>
        <TreeView Grid.Row="1" Margin="0,5,5,0" x:Name="OptionsTreeView">
            <i:Interaction.Behaviors>
                <Behaviors:BindableSelectedItemBehaviour SelectedItem="{Binding SelectedItem, Mode=TwoWay}" />
            </i:Interaction.Behaviors>
            <TreeViewItem Header="设备信息" x:Name="GeneralInfoItem" Selected="GeneralInfoItem_Selected" >
            </TreeViewItem>
          <TreeViewItem IsExpanded="True" Header="相机设置" x:Name="CamerasSettingsItem" >
                <TreeViewItem IsExpanded="true" x:Name="Camera1" Header="相机1" MouseLeftButtonUp="TreeViewItem_MouseLeftButtonUp"  Selected="CamerasSettingsItem_Selected">
                    <TreeViewItem Header="车道1" x:Name="LaneItem" MouseLeftButtonUp="LaneItem_MouseLeftButtonUp" Selected="LaneItem_Selected" />
                </TreeViewItem>
          </TreeViewItem>
        </TreeView>
        <Frame x:Name="mainViewContainer" 
               Margin="5,5,0,0" 
               BorderThickness="1" 
               BorderBrush="Gray"
               Grid.Column="1"
               Grid.Row="1"
               NavigationUIVisibility="Hidden" />
      <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"  Grid.ColumnSpan="2" >
            <Label Content="设备IP：" VerticalAlignment="Center"/>
            <TextBox TextWrapping="Wrap" Width="150" VerticalAlignment="Center"/>
            <Button Content="连接" Width="50" Margin="3,3,0,3" Command="{Binding Connect}"/>
        </StackPanel>
    </Grid>

</catel:DataWindow>
